﻿using AutoMapper;
using Commonality.ReturnView;
using Models.Managemen;
using ModelToDto.Managemen;

namespace IService.AutoMapper
{
    public class AutoMapperConfigs:Profile
    {
        public AutoMapperConfigs()
        {
            CreateMap<Mp_Users, UsersDTO>().ReverseMap();
            //users分页
            
            CreateMap<PagingData<UsersDTO>, PagingData<Mp_Users>>().ReverseMap();
            //菜单
            CreateMap<PagingData<MenueDTO>, PagingData<Mp_Menue>>().ReverseMap();
            CreateMap<MenueDTO, Mp_Menue>().ReverseMap();
            CreateMap < AddMenueDTO, Mp_Menue>().ReverseMap();
            //CreateMap<List<MenueDTO>, List<Mp_Menue>>().ReverseMap();
            //角色
            CreateMap<PagingData<RoleDTO>, PagingData<Mp_Role>>().ReverseMap();
            CreateMap<RoleDTO, Mp_Role>().ReverseMap();


        }
    }
}
